//
//  AppScreenUtils.m
//  BaseProject
//
//  Created by 王盼盼 on 2024/11/12.
//  Copyright © 2024 wangpanpan. All rights reserved.
//

#import "AppScreenUtils.h"

@implementation AppScreenUtils
@dynamic statusBarHeight;
+ (CGFloat)statusBarHeight {
    CGFloat statusBarHeight = 0;
    if (@available(iOS 13.0, *)) {
        UIStatusBarManager *statusBarManager = [UIApplication sharedApplication].windows.firstObject.windowScene.statusBarManager;
        statusBarHeight = statusBarManager.statusBarFrame.size.height;
    } else {
        statusBarHeight = [UIApplication sharedApplication].statusBarFrame.size.height;
    }
    if (statusBarHeight == 0) {
        statusBarHeight = (CGFloat)(kIs_iPhoneX?(44.0):(20.0));
    }
    return statusBarHeight;
}
@end
